<template>
  <!-- 性别弹窗 -->
  <transition
    name="custom-classes-transition"
    enter-active-class="animated fadeInUp"
    leave-active-class="animated fadeOutDown"
  >
    <div class="van-model" v-show="isShowSexModel">
      <div class="van-model-sex">
        <div class="model-sex-box">
          <p
            class="item"
            v-for="item in sexColumns"
            :key="item"
            @click.stop="onSexConfirm(item)"
          >{{item}}</p>
        </div>
        <p class="btn" @click.stop="onSexCancel">取消</p>
      </div>
    </div>
  </transition>
</template>
<script>
import Vue from "vue";
import mixin from "@/utils/mixin";
import { Toast, Picker } from "vant";
Vue.use(Toast).use(Picker);
 
export default {
  name: "ModalSex",
  mixins: [mixin],
  props: ["isShowSexModel"],
  data() {
    return { 
      sexColumns: ["男", "女"],
    };
  },
  mounted() {},
  methods: {
    // 省市
    onSexConfirm(value ) {
      this.$emit("update:isShowSexModel", false);
      this.$emit("onSexConfirm", value);
      //   Toast(`当前值：${value}, 当前索引：${index}`);
    },
    onSexCancel() {
      this.$emit("update:isShowSexModel", false);
    }
  }
};
</script>
<style lang="scss" scoped>

.van-model-sex {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 34px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  color: rgba(48, 49, 51, 1);
  .model-sex-box {
    width: 686px;
    background: rgba(255, 255, 255, 1);
    border-radius: 24px;
    margin: auto;
    .item {
      width: 100%;
      height: 114px;
      line-height: 114px;
      text-align: center;
      border-bottom: 1px solid rgba(241, 241, 241, 1);
      &:last-child {
        border: none;
      }
    }
  }
  .btn {
    width: 686px;
    height: 114px;
    line-height: 114px;
    text-align: center;
    color: rgba(255, 37, 37, 1);
    word-spacing: 1px;
    letter-spacing: 5px;
    background: rgba(255, 255, 255, 1);
    border-radius: 24px;
    margin: 16px auto 28px;
  }
}
</style>
